#include "View.h"
#include <QtOpenGL/QGLWidget>

using namespace br::org::view;

View::View( QWidget* parent ) : QGraphicsView( parent )
{
    this->setScene( new Scene() );
    this->setRenderHint( QPainter::Antialiasing );
    this->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
    this->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
    this->setCacheMode( QGraphicsView::CacheBackground );
    this->setDragMode( QGraphicsView::NoDrag );
    this->setViewport( new QGLWidget() );
    this->resize( QSize( 640, 480 ) );
}

View::~View()
{            
}

void View::add( QGraphicsItem* item )
{
    this->scene()->addItem( item );
}
